package com.cskaoyan.mapper;

import com.cskaoyan.bean.Keyword;
import com.cskaoyan.bean.KeywordExample;
import java.util.List;

import com.cskaoyan.weixin.bean.search.HistoryKeyword;
import com.cskaoyan.weixin.bean.search.SearchHistory;
import org.apache.ibatis.annotations.Param;

public interface KeywordMapper {
    long countByExample(KeywordExample example);

    int deleteByExample(KeywordExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Keyword record);

    int insertSelective(Keyword record);

    List<Keyword> selectByExample(KeywordExample example);

    Keyword selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Keyword record, @Param("example") KeywordExample example);

    int updateByExample(@Param("record") Keyword record, @Param("example") KeywordExample example);

    int updateByPrimaryKeySelective(Keyword record);

    int updateByPrimaryKey(Keyword record);

    List<Keyword> queryHotKeywordList();

    List<HistoryKeyword> queryHistorySearchOfUser(@Param("userId") Integer userId);

    int insertSearchHistory(@Param("searchHistory") SearchHistory searchHistory);

    int deleteSearchHistoryByUserId(Integer userId);

    List<String> selectKeywordsByKeyword(@Param("keyword") String keyword);

    Integer selectSearchHistoryByKeyword(@Param("keyword") String keyword);
}
